<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Returns the integer portion of a variant</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.variant-fix" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">variant_fix</h1>
  <p class="verinfo">(PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">variant_fix</span> &mdash; <span class="dc-title">Returns the integer portion of a variant</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.variant-fix-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>variant_fix</strong></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$variant</code></span>
   ) : <span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span></div>

  <p class="para rdfs-comment">
   Gets the integer portion of a variant.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.variant-fix-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">variant</code></dt>

     <dd>

      <p class="para">
       The variant.
      </p>
     </dd>

    
   </dl>

  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
<p class="para">
 对于所有变量运算函数，本函数的参数可以是 PHP
 内置的类型（整数，字符串，浮点数，布尔型或者
 <strong><code>NULL</code></strong>），或者是一个 COM，VARIANT 或者 DOTNET 类的实例。PHP
 内置类型将会使用和构造<a href="class.variant.html" class="xref">VARIANT</a>类相同的规则转换成变量。COM 和 DOTNET
 对象的值将会取其默认属性并被当成变量值使用。
</p>
<p class="para">
 变量运算函数是同名函数在 COM
 库中的外包；有关此类函数的更多信息参见 MSDN
 库。PHP 函数命名有少许区别，例如 PHP
 中的 <span class="function"><a href="variant_add.html" class="function">variant_add()</a></span> 对应于
 MSDN 文档中的 <em>VarAdd()</em>。
</p>
</p></blockquote>

 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.variant-fix-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   If <code class="parameter">variant</code> is negative, then the first negative
   integer greater than or equal to the variant is returned, otherwise
   returns the integer portion of the value of
   <code class="parameter">variant</code>.
  </p>
 </div>

 <div class="refsect1 notes" id="refsect1-function.variant-fix-notes">
  <h3 class="title">注释</h3>
  <div class="warning"><strong class="warning">Warning</strong>
   <p class="simpara">
    This documentation is based on the MSDN documentation; it appears
    that this function is either the same as
    <span class="function"><a href="variant_int.html" class="function">variant_int()</a></span>, or that there is an error in the MSDN
    documentation.
   </p>
  </div>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.variant-fix-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="variant_int.html" class="function" rel="rdfs-seeAlso">variant_int()</a> - Returns the integer portion of a variant</span></li>
    <li class="member"><span class="function"><a href="variant_round.html" class="function" rel="rdfs-seeAlso">variant_round()</a> - Rounds a variant to the specified number of decimal places</span></li>
    <li class="member"><span class="function"><a href="floor.html" class="function" rel="rdfs-seeAlso">floor()</a> - 舍去法取整</span></li>
    <li class="member"><span class="function"><a href="ceil.html" class="function" rel="rdfs-seeAlso">ceil()</a> - 进一法取整</span></li>
    <li class="member"><span class="function"><a href="round.html" class="function" rel="rdfs-seeAlso">round()</a> - 对浮点数进行四舍五入</span></li>
   </ul>
  </p>
 </div>

</div></div></div></body></html>